package com.suray.type;

/**
 * 地图导航类型
 */
public enum MoveStyle {
    QR_CODE_NAVIGATION("NQ==","二维码导航"),
    FIXED_TRACK_NAVIGATION("Ng==","固定轨道导航");

    private String code;

    private String desc;

    MoveStyle(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static MoveStyle getInstanceByCode(String code){
        MoveStyle[] values = MoveStyle.values();
        for (MoveStyle moveStyle : values){
            if(moveStyle.code.equals(code)){
                return moveStyle;
            }
        }
        throw new RuntimeException("不存在对应的动作类型");
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
